package com.demo.springBoot2.mapper;

import com.demo.springBoot2.entity.UsersInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.demo.springBoot2.entity.dto.UsersInfoLoginDTO;
import com.demo.springBoot2.entity.vo.UsersInfoLoginVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 用户信息 Mapper 接口
 * </p>
 *
 * @author wuHua·pl
 * @since 2024-03-16
 */
@Mapper
public interface UsersInfoMapper extends BaseMapper<UsersInfo> {
    UsersInfo selectUserByName(String username);
    List<UsersInfoLoginDTO> selectUserByPhone(@Param("phone") String phone,@Param("userId") Integer userId);
    UsersInfo selectUserByUserId(Integer userId);
    @Select("select * from users_info where username = #{username} and password = #{password}")
    UsersInfo setUserByNameAndPass(UsersInfo usersInfo);
}
